package com.dreamer.repository.mobile;

import com.dreamer.domain.mall.goods.Price;
import org.hibernate.Session;
import org.hibernate.query.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by huangfei on 28/06/2017.
 */
@Repository
public class PriceDao extends BaseDaoImpl<Price> {

    private Session getCurrentSession() {
        return getSessionFactory().getCurrentSession();
    }

    public List<Price> findPrice() {
        String queryString = "from Price";
        Query query = getCurrentSession().createQuery(queryString);
        return  query.list();
    }

}